package a.e.a;

import a.c.q;
import a.d.u;
import a.i.ib;
import a.j.ld;
import a.j.md;
import a.j.nd;
import a.j.od;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class z
  extends r
{
  Double g;
  private ld h;
  private URL i;
  private static Map j = new HashMap();
  private a_ k;
  public static int l;
  
  public z(URL paramURL)
  {
    this.i = paramURL;
  }
  
  public void a(String paramString)
  {
    if ("styleproperties".equals(paramString))
    {
      this.k = new a_(null);
      a(paramString, this.k);
    }
    super.a(paramString);
  }
  
  public void a()
  {
    super.a();
    this.h = null;
    a("type", "rectangle");
    a("x", new Double(100.0D));
    a("y", new Double(100.0D));
  }
  
  public void b()
  {
    boolean bool = r.f;
    int n = r.e;
    if (!bool)
    {
      if (this.c.get("image") != null)
      {
        localObject1 = new nd();
        ((nd)localObject1).d(a(d("image"), this.i));
        ((nd)localObject1).j();
        if (!bool)
        {
          if (this.c.containsKey("alphaImage")) {
            ((nd)localObject1).a(c("alphaImage"));
          }
          if (bool) {
            break label657;
          }
          this.h = ((ld)localObject1);
        }
        if (n == 0) {
          break label656;
        }
      }
      if (bool) {}
    }
    else
    {
      if (!this.c.containsKey("customconfiguration")) {
        break label502;
      }
    }
    Object localObject1 = d("customconfiguration");
    Object localObject3;
    Object localObject2;
    if ((c("group")) && (localObject1 != null))
    {
      localObject3 = new a.j.a.n();
      ((a.j.a.n)localObject3).a(false);
      ((a.j.a.n)localObject3).e((String)localObject1);
      localObject2 = localObject3;
      ((a.j.a.n)localObject3).b(c("closed"));
      ((a.j.a.n)localObject3).i(e("closedHeight"));
      ((a.j.a.n)localObject3).h(e("closedWidth"));
      ((a.j.a.n)localObject3).c(new u(e("borderInsetTop"), e("borderInsetLeft"), e("borderInsetBottom"), e("borderInsetRight")));
      ((a.j.a.n)localObject3).b(new u(e("minimalInsetTop"), e("minimalInsetLeft"), e("minimalInsetBottom"), e("minimalInsetRight")));
      ((a.j.a.n)localObject3).a(c("autoResize"));
      if (bool) {
        break label311;
      }
      if (n == 0) {}
    }
    else
    {
      localObject2 = new md();
      ((md)localObject2).e((String)localObject1);
    }
    label311:
    String str;
    if (!bool) {
      if (this.c.containsKey("userdata"))
      {
        if (bool) {
          break label463;
        }
        if (this.c.containsKey("userdataclass"))
        {
          localObject3 = d("userdata");
          str = d("userdataclass");
          try
          {
            Object localObject4 = ib.c().a((String)localObject3, Class.forName(str));
            ((md)localObject2).b(localObject4);
          }
          catch (Exception localException)
          {
            a.i.n.a("Could not parse userdata " + (String)localObject3 + " [" + str + "] " + localException);
          }
          catch (LinkageError localLinkageError)
          {
            a.i.n.a("Could not parse userdata " + (String)localObject3 + " [" + str + "] " + localLinkageError);
          }
        }
      }
    }
    label463:
    if (!bool) {
      if (this.k != null)
      {
        this.k.a((md)localObject2);
        this.k = null;
      }
    }
    if (!bool)
    {
      this.h = ((ld)localObject2);
      if (n != 0)
      {
        label502:
        localObject1 = new od();
        localObject2 = d("type");
        localObject3 = (Byte)j.get(localObject2);
        if (!bool)
        {
          if (localObject3 == null) {
            localObject3 = new Byte((byte)2);
          }
          ((od)localObject1).b(((Byte)localObject3).byteValue());
        }
        str = null;
        str = d("dropShadowColor");
        if (!bool) {
          if (!"".equals(str)) {
            ((od)localObject1).f(f.c(str));
          }
        }
        if (!bool)
        {
          if (this.c.containsKey("dropShadowOffsetX")) {
            ((od)localObject1).d((byte)f("dropShadowOffsetX"));
          }
          if (bool) {}
        }
        else if (this.c.containsKey("dropShadowOffsetY"))
        {
          ((od)localObject1).c((byte)f("dropShadowOffsetY"));
        }
        this.h = ((ld)localObject1);
      }
    }
    label656:
    label657:
    if (this.h != null)
    {
      localObject1 = null;
      localObject1 = d("fill");
      if (!bool)
      {
        if (!"".equals(localObject1)) {
          this.h.a(f.c((String)localObject1));
        }
        localObject1 = d("fill2");
      }
      if (!bool)
      {
        if (!"".equals(localObject1)) {
          this.h.b(f.c((String)localObject1));
        }
        localObject1 = d("outline");
      }
      if (!bool) {
        if (!"".equals(localObject1)) {
          this.h.c(f.c((String)localObject1));
        }
      }
      if (!bool) {
        if (this.c.containsKey("hasFill"))
        {
          if (bool) {
            break label813;
          }
          if (!c("hasFill")) {
            this.h.a(null);
          }
        }
      }
      label813:
      if (bool) {
        break label844;
      }
      if (this.c.containsKey("hasOutline"))
      {
        if (bool) {
          break label844;
        }
        if (!c("hasOutline")) {
          this.h.c(null);
        }
      }
    }
    label844:
    int m = 1;
    if (!bool) {
      if (this.c.containsKey("width"))
      {
        m = f("width");
        if (bool) {
          break label923;
        }
        if (n == 0) {
          break label907;
        }
      }
    }
    if (!bool)
    {
      if (this.c.containsKey("outlineWidth")) {
        m = f("outlineWidth");
      }
      label907:
      if (bool) {}
    }
    else if (this.c.containsKey("outlineStyle"))
    {
      label923:
      if (bool) {
        break label984;
      }
      this.h.a(c.a(m, s.h(d("outlineStyle"))));
      if (n == 0) {
        break label968;
      }
    }
    this.h.a(c.a(m, (byte)0));
    label968:
    if (!bool) {
      if (this.c.get("w") != null)
      {
        label984:
        if (bool) {
          break label1055;
        }
        this.h.e(a("w", 100.0D));
        if (n == 0) {
          break label1039;
        }
      }
    }
    if (!bool)
    {
      if (this.g != null) {
        this.h.e(this.g.doubleValue());
      }
      label1039:
      if (bool) {}
    }
    else if (this.c.get("h") != null)
    {
      label1055:
      this.h.f(a("h", 100.0D));
      if (bool) {
        break label1134;
      }
      if (n == 0) {
        break label1110;
      }
    }
    if (!bool) {
      if (this.g != null) {
        this.h.f(this.g.doubleValue());
      }
    }
    label1110:
    this.h.c(a("x", 0.0D), a("y", 0.0D));
    label1134:
    if (!bool)
    {
      if (q.n) {
        n++;
      }
    }
    else {
      r.e = n;
    }
    if (q.o) {
      r.f = !bool;
    }
  }
  
  protected URL a(String paramString, URL paramURL)
  {
    try
    {
      return new URL(paramString);
    }
    catch (MalformedURLException localMalformedURLException1)
    {
      try
      {
        return new URL(paramURL, paramString);
      }
      catch (MalformedURLException localMalformedURLException2) {}
    }
    return null;
  }
  
  public ld f()
  {
    return this.h;
  }
  
  public Object c()
  {
    return this.h;
  }
  
  public static byte g(String paramString)
  {
    return ((Byte)j.get(paramString)).byteValue();
  }
  
  static
  {
    j.put("ellipse", new Byte((byte)2));
    j.put("oval", new Byte((byte)2));
    j.put("circle", new Byte((byte)2));
    j.put("rectangle", new Byte((byte)0));
    j.put("triangle", new Byte((byte)5));
    j.put("parallelogram", new Byte((byte)3));
    j.put("hexagon", new Byte((byte)4));
    j.put("diamond", new Byte((byte)8));
    j.put("octagon", new Byte((byte)7));
    j.put("roundrectangle", new Byte((byte)1));
    j.put("rectangle3d", new Byte((byte)6));
    j.put("trapezoid", new Byte((byte)9));
    j.put("trapezoid2", new Byte((byte)10));
  }
  
  private static class a_
    extends r
  {
    private Map g = new HashMap();
    
    private a_() {}
    
    public void a(String paramString)
    {
      super.a(paramString, new r());
      super.a(paramString);
    }
    
    public void a(r paramr)
    {
      boolean bool = r.f;
      int i = r.e;
      super.a(paramr);
      String str1 = paramr.d("name");
      String str2 = paramr.d("binaryValue");
      if (!bool) {
        if (str2.length() > 0)
        {
          localObject = kb.a().a(str2);
          if (bool) {
            break label74;
          }
          this.g.put(str1, localObject);
          if (i == 0) {
            return;
          }
        }
      }
      label74:
      Object localObject = paramr.d("valueClass");
      String str3 = paramr.d("value");
      if (!bool) {
        if (((String)localObject).length() > 0)
        {
          try
          {
            this.g.put(str1, ib.c().a(str3, Class.forName((String)localObject)));
          }
          catch (ClassNotFoundException localClassNotFoundException)
          {
            if (bool) {
              break label160;
            }
          }
          localClassNotFoundException.printStackTrace(System.err);
          if (i == 0) {
            return;
          }
        }
      }
      label160:
      this.g.put(str1, null);
    }
    
    public void a(md parammd)
    {
      boolean bool = r.f;
      int i = r.e;
      Iterator localIterator = this.g.entrySet().iterator();
      if (localIterator.hasNext()) {}
      while (bool)
      {
        Map.Entry localEntry = (Map.Entry)localIterator.next();
        parammd.a((String)localEntry.getKey(), localEntry.getValue());
        if ((!bool) && (i != 0)) {
          return;
        }
        if (i == 0) {
          break;
        }
      }
      this.g.clear();
    }
    
    a_(z.1 param1)
    {
      this();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.e.a.z

 * JD-Core Version:    0.7.0.1

 */